#pragma once
#include "Window.h"
#include "Runtime/Rendering/RenderResource.h"

namespace Alice
{
    class CGIViewport;
    class SlaveRenderer
    {
    public:
        virtual bool Initialize() = 0;
        virtual void* GetViewportResource( const Window* Window ) { return nullptr; }
        virtual void CreateViewport(Window* inWindow ) = 0;
    };
    struct SlaveViewportInfo : public RenderResource
    {
        SmartPtr<CGIViewport> mCGIViewport;
        void* OSWindow = nullptr;
    };
    class SlaveCGIRenderer:public SlaveRenderer
    {
    public:
        std::unordered_map<const Window*,SlaveViewportInfo*> mWindowToViewportInfo;
        virtual bool Initialize() override;
        virtual void* GetViewportResource( const Window* Window ) override;
        virtual void CreateViewport(Window* inWindow )override;
    };
}
